package com.posjiajia.user.core.dao;

import com.posjiajia.user.core.po.UserPo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by zhenhua.sun on 8/21/16.
 */
public interface UserDao {

    void updateUser(UserPo userPo);

    UserPo get(Long userId);

    void insert(UserPo userPo);

    /**
     * 根据身份识别码和密码查询用户
     * @param pin 邮箱或手机号
     * @param password
     * @return
     */
    UserPo queryUserByPinAndPwd(@Param("pin") String pin, @Param("password") String password);

    /**
     * 查询用户
     * @param userPo
     * @return
     */
    List<UserPo> queryUser(UserPo userPo);

    /**
     * 根据用户标识查询用户
     * @param pin
     * @return
     */
    UserPo getUserByPin(String pin);
}
